Skip to content
This repository was archived by the owner on Jul 22, 2025. It is now read-only.

Conversation

@xfalcox
Copy link
Member

@xfalcox xfalcox commented Feb 18, 2025

From pgvector/pgvector README

With approximate indexes, filtering is applied after the index is scanned. If a condition matches 10% of rows, with HNSW and the default hnsw.ef_search of 40, only 4 rows will match on average. For more rows, increase hnsw.ef_search.

Starting with 0.8.0, you can enable iterative index scans, which will automatically scan more of the index when needed.

Since we are stuck on 0.7.0 we are going the first option for now.

@xfalcox xfalcox marked this pull request as draft February 18, 2025 20:11
@xfalcox xfalcox marked this pull request as ready for review February 19, 2025 17:31
@xfalcox xfalcox changed the title stuff FIX: Add workaround to pgvector HNSW search limitations Feb 19, 2025
@xfalcox xfalcox merged commit 37bf160 into main Feb 19, 2025
6 checks passed
@xfalcox xfalcox deleted the hnsw-workaround branch February 19, 2025 19:30
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants